package com.amoby.main.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.amoby.main.entity.BusinessType;

public interface BusinessTypeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(BusinessType record);

    int insertSelective(BusinessType record);

    BusinessType selectByPrimaryKey(Long id);

    Long selectIdByCode(String code);

    int updateByPrimaryKeySelective(BusinessType record);

    int updateByPrimaryKey(BusinessType record);

    List<Map<String, Object>> getAllBusinessTypes();

    List<String> queryUsedCodes(@Param("parentId") Long parentId);

    List<Map<String, Object>> queryByParentId(Long parentId);

    int deleteCaseChildren(Integer id);

    List<Map<String, Object>> queryParent();

    List<BusinessType> selectParentType();

    List<BusinessType> selectSubType(Long parentId);
}